<template>
  <el-carousel :interval="4000" type="card" height="204px">
    <el-carousel-item v-for="item in props.imgs" :key="item">
      <img :src="item.name">
    </el-carousel-item>
  </el-carousel>
</template>

<script setup>
  import { defineProps } from "vue"   
  const props = defineProps({               //使用defineProps替代props
    imgs:{
      type:[]
    }
  })
</script>

<style scoped>
.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}
.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>

